using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace WindowsGame4
{
    class InstructionsScreen : MenuScreen
    {
        #region Fields
        MenuEntry nextPage;
        static string[] pageContent = {
                                          "The goal is to abduct as many specimen as possible\nWithout being destroyed by these specimen",
                                          "Press the saucer and drag away\nto activate your mighty engines!",
                                          "Increase the strength of your saucer\nby visiting your hangar!\nIt may require you part with a few specimen...",
                                          "That's it! Press back to continue!"
                                      };
        int page = 0;

        #endregion


        #region Initialization
        //constructor
        public InstructionsScreen()
            : base("Instructions")
        {

            // Create our menu entries.
           nextPage = new MenuEntry(string.Empty);

           SetMenuEntryText();

           // Hook up menu event handlers.
           nextPage.Selected += NextPageSelected;

           // Add entries to the menu.
           MenuEntries.Add(nextPage);
        }

        void SetMenuEntryText()
        {
            nextPage.Text = pageContent[page];
        }

        #endregion

        #region Handle Input
        void NextPageSelected(object sender, PlayerIndexEventArgs e)
        {

                page = (page + 1) % pageContent.Length;
                SetMenuEntryText();
            
            
        }

        #endregion
    }
}
